home *** CD-ROM | disk | FTP | other *** search
- /*
- ** Apple Macintosh Developer Technical Support
- **
- ** Program: MacShell
- ** File: idletasks.c
- ** Written by: Eric Soldan
- **
- ** Copyright © 1990-1991 Apple Computer, Inc.
- ** All rights reserved.
- */
-
-
-
- /*****************************************************************************/
-
-
-
- #include "MacShell.h" /* Get the MacShell includes/typedefs, etc. */
- #include "MacShellCommon.h" /* Get the stuff in common with rez. */
- #include "MacShell.protos" /* Get the prototypes for MacShell. */
-
- #ifndef __NOTIFICATION__
- #include <Notification.h>
- #endif
-
- #ifndef __RESOURCES__
- #include <Resources.h>
- #endif
-
- #ifdef THINK_C
- #include "Utilities.h"
- #else
- #ifndef __UTILITIES__
- #include <Utilities.h>
- #endif
- #endif
-
-
-
- /*****************************************************************************/
-
-
-
- static Boolean notifyActive = false;
- static NMRec notifyTheUser = {
- nil, /* qLink */
- nmType, /* qType */
- 0, /* nmFlags */
- 0L, /* nmPrivate */
- 0, /* nmReserved */
- 1, /* nmMark */
- nil, /* nmIcon */
- (Handle)-1, /* nmSound */
- nil, /* nmStr */
- nil, /* nmResp */
- 0L /* nmRefCon */
- };
-
- extern RgnHandle gCursorRgn;
-
-
-
- /*****************************************************************************/
- /*****************************************************************************/
-
-
-
- #pragma segment Main
- void DoIdleTasks(EventRecord *event)
- {
- #pragma unused (event)
-
- DynamicBalloonHelp();
- }
-
-
-
- /*****************************************************************************/
-
-
-
- #pragma segment Main
- void NotifyCancel(void)
- {
- if (notifyActive) {
- NMRemove((NMRecPtr)¬ifyTheUser);
- notifyActive = false;
- }
- }
-
-
-
-
- /*****************************************************************************/
-
-
-
- #pragma segment Main
- void NotifyUser(void)
- {
- if (gInBackground) {
- if (!notifyActive) {
- notifyTheUser.nmIcon = GetResource('SICN', 128);
- NMInstall(¬ifyTheUser);
- notifyActive = true;
- }
- }
- }
-
-
-
-